package com.atguigu.srb.core;


import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.transaction.annotation.EnableTransactionManagement;
import springfox.documentation.swagger2.annotations.EnableSwagger2;

@SpringBootApplication
@MapperScan(basePackages = "com.atguigu.srb.core.mapper")
@ComponentScan(basePackages = "com.atguigu.srb")
@EnableSwagger2
@EnableTransactionManagement  //事务处理
@EnableAsync //开启异步
@EnableCaching
@EnableScheduling
@RefreshScope//无感刷新配置文件的配置信息（就是不需要重新启动服务）
public class srbCoreApplication {
    public static void main(String[] args) {

        SpringApplication.run(srbCoreApplication.class,args);
    }
    /*
            Api文档
            http://localhost:8160/doc.html
     */
}
